package com.bls.executor.environment.threadPool;

import lombok.Getter;

import java.util.concurrent.*;

@Getter
public final class ThreadPoolGroup {
    private ThreadPoolExecutor listenThreadPool;
    private ScheduledExecutorService scheduleThreadPool;

    public ThreadPoolGroup(){
        this.listenThreadPool=new ThreadPoolExecutor(4,
                10,
                3,
                TimeUnit.MINUTES,
                new LinkedBlockingDeque<>(100),
                new NamedThreadFactory("listenThreadPool"),
                new ThreadPoolExecutor.AbortPolicy());


        this.scheduleThreadPool = Executors.newScheduledThreadPool(4,
                new NamedThreadFactory("scheduleThreadPool"));
    }

}
